{layout name="../common/master"/}

<script src="__PUBLIC__/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css">

<div id="right">
    <h4 style="border-bottom: 1px solid #ccc;padding-bottom: 3px">修改通用配置</h4>
    <div id="app">
        <form action="javascript:;" method="post" role="form" class="col-lg-6">
            <div class="form-group">
                <label for="">配置名称</label>
                <input type="text" class="form-control" value="{$data['name']}" name="name"  placeholder="请输入配置名称">
            </div>

            <div class="form-group">
                <label for="">类型</label>
                <input type="text" class="form-control" value="{$data['type']}" id="couponBonus" name="type" >
            </div>

            <div class="form-group">
                <label for="">平台</label>
                <input type="text" class="form-control" value="{$data['plantfrom']}"  name="plantform" >
            </div>

            <div class="form-group">
                <label for="">内容</label>
                <textarea name="content" id="" cols="50" rows="10" placeholder="电话:111111">{$data['content']}</textarea>
            </div>

            <button type="submit" id="form_submit" class="btn btn-primary">提交</button>
        </form>
    </div>
</div>
<script>

    $("#form_submit").click(function () {
        var id="{$_GET['uid']}";
        var data=$('form').serialize();
        data=data+'&id='+id;
        $.post("{:URL('home/Appconfig/editCommonConfig')}",data,function(res){
           if(res.code == 0){
               layer.msg("添加成功");
               location.href="{:URL('home/Appconfig/commonConfig')}";
           }else{
               layer.msg(res.data,function(){});
           }
        })
    })
</script>
<script type="text/javascript" src="__PUBLIC__/home/tuo/DatePicker/WdatePicker.js"></script>

